Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] Refactor rules for modularization by updating bulkCreate and wrapHits methods #101544

Merged
merged 14 commits into from
Jun 14, 2021

Conversation

ecezalp
Copy link
Contributor

@ecezalp ecezalp commented Jun 7, 2021

co-authored with @marshallmain

Summary

This PR creates bulkCreate and wrapHits factories and creates & injects bulkCreate and wrapHits functions into each rule executor within the detection engine from signal_rule_alert_type.ts. The purpose of this work is to take a step towards modularized rule executors that can eventually work both within the detection engine with the existing implementation, and with the new RAC rules that are registered through the alerting framework.

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@ecezalp ecezalp added the Theme: rac label obsolete label Jun 7, 2021
@ecezalp ecezalp requested a review from a team June 7, 2021 22:50
@ecezalp ecezalp self-assigned this Jun 7, 2021
@ecezalp ecezalp added release_note:skip Skip the PR/issue when compiling release notes v7.14.0 labels Jun 7, 2021
@madirey
Copy link
Contributor

madirey commented Jun 13, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @ecezalp

@ecezalp ecezalp merged commit 4fb0c94 into elastic:master Jun 14, 2021
@ecezalp ecezalp added the auto-backport Deprecated - use backport:version if exact versions are needed label Jun 14, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 14, 2021
…kCreate and wrapHits methods (elastic#101544)

creates bulkCreate and wrapHits factories for the modularization of the detection engine

Co-authored-by: Marshall Main <marshall.main@elastic.co>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jun 14, 2021
…kCreate and wrapHits methods (#101544) (#102107)

creates bulkCreate and wrapHits factories for the modularization of the detection engine

Co-authored-by: Marshall Main <marshall.main@elastic.co>

Co-authored-by: Ece Özalp <ozale272@newschool.edu>
Co-authored-by: Marshall Main <marshall.main@elastic.co>
cuff-links pushed a commit to cuff-links/kibana that referenced this pull request Jun 15, 2021
…kCreate and wrapHits methods (elastic#101544)

creates bulkCreate and wrapHits factories for the modularization of the detection engine

Co-authored-by: Marshall Main <marshall.main@elastic.co>
@ecezalp ecezalp mentioned this pull request Jun 16, 2021
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Theme: rac label obsolete v7.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants